package topcoder;

import data_structure.BTNode;

public class Practice {

	
	public static boolean isPalindrome(int num){
		if(num < 0) return false;
		if(num == reverse(num)) return true;
		return false;
	}
	
	public static int reverse(int num){
		int res = num % 10;
		num /= 10;
		while(num != 0){
			res *= 10;
			res += num % 10;
			num /= 10;
		}
		return res;
	}
	
	public static void delete(BTNode n){
		n = null;
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		System.out.println(isPalindrome(1));
		BTNode node = new BTNode(12);
		delete(node);
		System.out.println(node.val);
		System.out.println("111".substring(3));
	}

}
